Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check for uppercase 'head' when updating subprojects (fixes #12730) #13840

Merged
merged 1 commit into from
Nov 6, 2024

Conversation

andy5995
Copy link
Contributor

@andy5995 andy5995 commented Oct 30, 2024

This change may be more robust. I get these errors when using head for the value of revision in a wrap file and using 'checkout' or 'update' with the meson subprojects option:

$ meson subprojects checkout
Checkout head in decimal...
  -> Could not checkout head in subprojects/decimal
fatal: invalid reference: head
Git command failed: ['/usr/bin/git', 'checkout', '--ignore-other-worktrees', 'head', '--']
$ meson subprojects update
Updating decimal...
  -> Could not fetch revision head in subprojects/decimal
fatal: couldn't find remote ref head
Git command failed: ['/usr/bin/git', 'fetch', '--refmap', '+refs/heads/*:refs/remotes/origin/*', '--refmap', '+refs/tags/*:refs/tags/*', 'origin', 'head']

When I change the revision value to 'HEAD', there's no problem:

$ meson subprojects update
Updating decimal...
-> 0d27065 (grafted, HEAD -> main, origin/main, origin/HEAD) Update installation document to state this project has now git submodules. [semihc]

EDIT:

fixes #12730

@andy5995 andy5995 changed the title docs: change 'head' to 'HEAD'in wrap manual docs: change 'head' to 'HEAD' in wrap manual (value of revision example) Oct 30, 2024
@andy5995 andy5995 changed the title docs: change 'head' to 'HEAD' in wrap manual (value of revision example) Check for uppercase 'head' when updating subprojects Nov 3, 2024
@andy5995
Copy link
Contributor Author

andy5995 commented Nov 3, 2024

So after realizing this was more of a bug than a doc issue, I was able to find some of the code. I left the HEAD uppercase in the docs for now. I figured git is case-sensitive about HEAD and probably best practices would indicate using "HEAD" is a better habit. But of course I'll change the docs back if you prefer.

@andy5995
Copy link
Contributor Author

andy5995 commented Nov 3, 2024

I believe this is a fix for #12730

@andy5995 andy5995 changed the title Check for uppercase 'head' when updating subprojects Check for uppercase 'head' when updating subprojects (fixes #12730) Nov 3, 2024
@jpakkane jpakkane merged commit f0851c9 into mesonbuild:master Nov 6, 2024
34 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Subprojects update fails for all Git wraps with revision = 'head'
4 participants